<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <form class="form-horizontal" action="/notice/save"  method="post">
    <fieldset>
    <div id="legend" class="">
        		<legend class="">提交通告</legend>
      		</div>
    <div class="control-group">
          <label class="control-label">链接：</label>
		<input type="hidden" value="${notice.id }" name="id"/>
          <div class="controls">
            <input type="text" name="link" value="${notice.link }">
          </div>
        </div>
        
		<div class="control-group">
          <label class="control-label">内容：</label>
          <input id="desc" name="desc" type="hidden">
          <!-- File Upload -->
          <div class="controls">
            <script  id="editor" type="text/plain">${notice.desc}</script>
          </div>
        </div>
    <div class="control-group">
          <label class="control-label"></label>

          <!-- Button -->
          <div class="controls">
            <button class="btn btn-default" type="submit" onclick="setVal();">确定</button>
          </div>
        </div>

    </fieldset>
  </form>

<script src="${resourceRoot }/third-party/ueditor/editor_config.js"></script>
<script src="${resourceRoot }/third-party/ueditor/editor_all_min.js"></script>
<script type="text/javascript">
var editor = UE.getEditor('editor',{
   	initialFrameWidth:400,
    initialFrameHeight:300

});


 $(document).ready(function() {
  	
  	$('form').ajaxForm({
		beforeSubmit:function(){
			return $('form').validate().form();
		},
		success:function(){
			$('#div_right').load("/notice/manage");
		}
	});
  	
 });
function setVal() {  
	$("#desc").val(editor.getContent()); 
}  
</script>
